package zuoye6;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Random;



public class Zuoye6 {

	public static void main(String[] args) throws NumberFormatException, IOException {
		ArrayList<Student> list=new ArrayList<>();
		BufferedReader br=new BufferedReader(new FileReader("names.txt"));
		String line;
		while((line=br.readLine())!=null){
			String[] arr = line.split("-");
			Student s=new Student(arr[0], arr[1], Integer.parseInt(arr[2]) );
			list.add(s);
		}
		br.close();
		Random r =new Random();
		int a= r.nextInt(50);
		

		Student student = list.get(a);
		System.out.println(student.getName());
	}
}
